var ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
    context: __dirname + '/src',
    entry: {
		app:'./app.entry.js'
	},
    devtool: 'eval',
    output: {
        path: __dirname + "/dist",
        filename: '[name].bundle.js'
    },
	externals:{
		//		'jsPlumb':'jsPlumb'
	},
    module: {
        loaders: [
            {
                test: /\.js?$/,
                exclude: /(node_modules|bower_components)/,
                loader: 'babel',
    			query: {
    				presets: ['react']
    			}
            },
            {
                test: /\.css$/,
                loader: ExtractTextPlugin.extract("style-loader", "css-loader")
            },
			{
				test:/\.less$/,
				loader:ExtractTextPlugin.extract('style-loader','raw-loader!less-loader')
			}
        ]
    },
	// Use the plugin to specify the resulting filename (and add needed behavior to the compiler)
	plugins: [
		new ExtractTextPlugin("[name].bundle.css")
	]
}
